
/**
 * Define a grammar called Hello
 */
grammar Hello;


operation:		LBR operation RBR									#BRACKIT	
				| left=operation DIF  right=operation				#Dif
	  			| left=operation MULT right=operation				#Mult
				| left=operation MINUS right=operation				#Minus
				| left=operation PLUS right=operation				#Plus
				| atom = ATOM										#Atom;
					
					
															
/**
 * Define a grammar called Hello
 */

WHITESACE : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines


LBR 				: '('	;
RBR					: ')'	;
MULT				: '*'	;
DIF					: '/'	;
PLUS 				: '+'	;
MINUS				: '-'	;

VARIABLEN 			:  [a-z] | [A-Z];

SIGN 				: '-'								;
DOT					: '.'								;

ATOM				: 	((SIGN)FLOAT )| FLOAT;
FLOAT 				: 	(NUMBERS (DOT (NUMBERS)))|NUMBERS; 
NUMBERS 			:   [0-9]+							;
